﻿using DongFangGuoKai.WMSPlatform.Core;
using DongFangGuoKai.WMSPlatform.Domain.Models;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.LogApp
{
    public class APILogService : IAPILogService
    {
        public readonly SimpleRepositroy<PMSLog> pmsLogRepository;

        public APILogService(SimpleRepositroy<PMSLog> pmsLogRepository)
        {
            this.pmsLogRepository = pmsLogRepository;
        }

        public async Task<List<PMSLog>> GetListAsync(PageModel pageModel)
        {
            var expable = Expressionable.Create<PMSLog>();

            var data = await pmsLogRepository.GetPageListAsync(expable.ToExpression(), pageModel);

            return data;
        }


    }
}
